Edward Vytlacil
Motivation: Mincer Wage Equation
Delta Method vs Bootstrap
Bootstrap Algorithm
Implementing Bootstrap: Average Effect of Experience
Implementing Bootstrap: Experience level that maximizes log wages.
Other Bootstrap Variants
Mincer wage equation (Mincer 1958):
\[\ln(wage)_i = \beta_0 + \beta_1 \mbox{exp}_i + \beta_2 \mbox{exp}_i^2 + e_i\]
Mincer wage equation (Mincer 1958):
\[\ln(wage)_i = \beta_0 + \beta_1 \mbox{exp}_i + \beta_2 \mbox{exp}_i^2 + e_i\]
Average effect of experience: \[\beta_1 + 2 \cdot \beta_2 \cdot \mathbb{E}(\mbox{exp}),\]
Experience level that maximizes log wage: \[\left | \frac{\beta_1}{2 \beta_2}\right |.\]
Let \(\widehat \beta_{1,N}, \widehat \beta_{2,N}\) denote OLS estimators,
Let \(\overline{\mbox{exp}}_N\) denote sample mean of experience.
Estimate average effect of experience by \[\widehat \beta_{1,N} + 2 \cdot \widehat \beta_{2,N} \cdot \overline{\mbox{exp}}_N,\]
Let \(\widehat \beta_{1,N}, \widehat \beta_{2,N}\) denote OLS estimators,
Estimate experience level that maximizes log wage by \[\left | \frac{\widehat \beta_{1,N}}{2 \widehat \beta_{2,N}}\right|.\]
library (AER)
data(CPS1985)
df <- CPS1985[ CPS1985$education==12, c("wage","experience")]
mean.exp <-mean(df$experience)
mean.exp
reg.1 <- lm(I(log(wage))~experience+I(experience^2),data=df)
reg.1
a <- c(0,1,2*mean.exp)
avg.eff.exp <- as.numeric(t(a)%*%coef(reg.1))
maxexp <- abs(coef(reg.1)[2]/(2*coef(reg.1)[3]))Consider estimation using CPS 1985 data.
available in package AER.
after loading AER, see ?CPS1985 for description of data.
Consider only using observations with \(12\) years of schooling.
library (AER)
data(CPS1985)
df <- CPS1985[ CPS1985$education==12, c("wage","experience")]
mean.exp <-mean(df$experience)
mean.exp
reg.1 <- lm(I(log(wage))~experience+I(experience^2),data=df)
reg.1
a <- c(0,1,2*mean.exp)
avg.eff.exp <- as.numeric(t(a)%*%coef(reg.1))
maxexp <- abs(coef(reg.1)[2]/(2*coef(reg.1)[3]))[1] "Mean Experience: 18.14"
Call:
lm(formula = I(log(wage)) ~ experience + I(experience^2), data = df)
Coefficients:
(Intercept) experience I(experience^2)
1.5829802 0.0352680 -0.0005831
[1] "Estimated Avg Effect Experience: 0.0141"
[1] "Estimated Experience that Maximizes Wage: 30.2"
\(\overline{\mbox{exp}}_N=\) 18.1
\(\widehat \beta_{1,N} =\) 0.0353
\(\widehat \beta_{2,N} =\) -0.000583
\(\widehat \beta_{1,N} + 2 \widehat \beta_{2,N} \overline{\mbox{exp}}_N=\) 0.0141
\(\left | \frac{\widehat \beta_{1,N}}{2 \widehat \beta_{2,N}}\right| =\) 30.2
\(\widehat \beta_{1,N} + 2 \widehat \beta_{2,N} \overline{\mbox{exp}}_N=\) 0.0141
\(\left | \frac{\widehat \beta_{1,N}}{2 \widehat \beta_{2,N}}\right| =\) 30.2
We have not covered methods for constructing standard errors or performing inference in this context.
How to compute standard errors? construct confidence intervals? perform hypothesis tests?
Motivation: Mincer Wage Equation
Delta Method vs Bootstrap
Bootstrap Algorithm
Implementing Bootstrap: Average Effect of Experience
Implementing Bootstrap: Experience level that maximizes log wages.
Other Bootstrap Variants
Asymptotic approximation based on linear approximation from Mean Value Theorem combined with LLN, CLT.
Limitations:
we will not cover in Econ 123
If knew distribution of population being sampled, could use Monte Carlo simulation drawing from that distribution to find distribution of our estimator.
Treat sample of size \(N\) as if it were the population.
Perform MC simulation, creating many bootstrap samples of size \(N\) by resampling with replacement from original sample.
Compute estimator on each sample, use distribution of estimates across samples to approximate distribution of estimator.
Difference between drawing from population vs from sample should vanish as \(N \rightarrow \infty\).
Limitations:
Advantages:
There are many versions of the bootstrap, but we will focus on nonparametric bootstrap and corresponding bootstrap:
Motivation: Mincer Wage Equation
Delta Method vs Bootstrap
Bootstrap Algorithm
Implementing Bootstrap: Average Effect of Experience
Implementing Bootstrap: Experience level that maximizes log wages.
Other Bootstrap Variants
Bootstrap Samples
Bootstrap Replications
Create \(B\) bootstrap samples, each constructed by drawing from original sample with replacement \(N\) times.
Compute bootstrap replication on each bootstrap sample, \(\widehat \theta^*(b) = s(\mathbf{W}^{*b})\)
Create \(B\) bootstrap samples, each constructed by drawing from original sample with replacement \(N\) times.
Compute bootstrap replication \(\widehat \theta^*(b)\) on each bootstrap sample.
Define bootstrap s.e. for \(\widehat \theta\) by \[\widehat{\mbox{se}}_B=\mbox{s.d.}(\widehat \theta^*(1),\widehat \theta^*(2),…,\widehat\theta^*(B))\] (illustrated in figure to right).
Given bootstrap standard error, \(\widehat{\mbox{se}}_B\):
Construct 95% normal-approximation bootstrap CI on \(\theta\) by \[C^{nb} = [\widehat{\theta}-1.96 \cdot \widehat{\mbox{se}}_B, ~\widehat{\theta}+1.96 \cdot \widehat{\mbox{se}}_B]\]
More generally, construct \(1-\alpha\) level normal-approximation bootstrap CI on \(\theta\) by \[[\widehat{\theta}- z_{1-\alpha/2} \cdot \widehat{\mbox{se}}_B, ~\widehat{\theta}+z_{1-\alpha/2} \cdot \widehat{\mbox{se}}_B]\] where \(z_{1-\alpha/2}\) is \(1-\alpha/2\) quantile of standard normal distribution.
Given \(B\) bootstrap replications, define the boostrap estimate of bias by \[\widehat{\mbox{bias}}^*= \frac{1}{B} \sum_{b=1}^B \widehat \theta^*(b) - \widehat \theta \] where \(\widehat \theta\) is estimate from original sample.
why centered at \(\widehat \theta\)?
Given \(B\) bootstrap replications, define \(q^*_{\alpha}\) as the \(\alpha\) empirical quantile of \((\widehat \theta^*(1),\widehat \theta^*(2),…,\widehat\theta^*(B))\)
Bootstrap Percentile CI: \[C^{PC}= [q_{\alpha/2},~ q_{1-\alpha/2}].\]
Normal-approximation bootstrap CI:
Normal-approximation bootstrap CI:
bootstrap percentile CI:
Pros:
intuitive, easy to implement,
valid under weaker conditions than bootstrap s.e. or bootstrap normal CI.
Cons:
BCa:
“bootstrap accelerated bias-corrected percentile interval”
adjusts percentile CI for median bias and skewness in bootstrap distribution
BCa:
Motivation: Mincer Wage Equation
Delta Method vs Bootstrap
Bootstrap Algorithm
Implementing Bootstrap: Average Effect of Experience
Implementing Bootstrap: Experience level that maximizes log wages.
Other Bootstrap Variants
We now implement bootstrap s.e. and CIs for average effect of experience.
\(\theta = \beta_{1} + 2 \cdot \beta_{2} \cdot \mathbb{E}[\mbox{exp}],\)
\(\widehat \theta = \widehat \beta_{1,N} + 2 \cdot \widehat \beta_{2,N} \cdot \overline{\mbox{exp}}_N.\)
We first proceed in base R, then consider using package boot.
First step: create bootstrap samples.
Create bootstrap sample:
Randomly draw \(N\) integers, with replacement, from \((1,...,N)\), with each integer equally likely to be draw,
Create new sample formed by observations with those indices.
Some observations from original sample will be drawn multiple times into bootstrap sample, others will not appear in bootstrap sample.
Original Sample
Bootstrap Sample 1
Original Sample
Bootstrap Sample 2
Original Sample
Bootstrap Sample 3
Original Sample
Bootstrap Sample 4
given bootstrap sample, \(\mathbf{W}^{*b}=(W^{*b}_1,W^{*b}_2,…,W^{*b}_N)\), compute \(\widehat \theta^*(b)=s(\mathbf{W}^{*b}).\)
# tab.b1 <- df[indices.b1,], bootstrap sample
mean.exp.b1 <- mean(tab.b1$experience) # sample mean experience on bootstrap sample
reg.b1 <- lm(I(log(wage))~ experience+I(experience^2),data=tab.b1) # OLS on bootstrap sample
# form bootstrap replication of estimated mean effect experience
a <- c(0,1,2*mean.exp.b1)
theta.b1 <- as.numeric(t(a)%*%coef(reg.b1)) Sample Estimate, \(\widehat{\theta} =\) 0.035 \(- 2\cdot\) 0.00058 \(\cdot\) 18.14
\(=\) 0.0141
Bootstrap Replication 1, \(\widehat{\theta}^*(1) =\) 0.032 \(-2\cdot\) -0.0005 \(\cdot\) 18.05
\(=\) 0.0139
Sample Mean Exp:
18.14
\(\widehat{y}=\) 1.58 \(+\) 0.035 \(\mbox{exp}\) \(-\) 0.00058 \(\mbox{exp}^2\)
Bootstrap Mean Exp:
18.05
\(\widehat{y}=\) 1.64 \(+\) 0.032 \(\mbox{exp}\) \(-\) 0.0005 \(\mbox{exp}^2\)
\(\widehat{\theta} =\) 0.035 \(+2\cdot\) 0.0353 \(\cdot\) 18.14 \(=\) 0.0141
Sample Estimate, \(\widehat{\theta} =\) 0.035 \(- 2\cdot\) 0.00058 \(\cdot\) 18.14
\(=\) 0.0141
Bootstrap Replication 2, \(\widehat{\theta}^*(2) =\) 0.024 \(-2\cdot\) -0.00044 \(\cdot\) 17.17
\(=\) 0.0085
Sample Mean Exp:
18.14
\(\widehat{y}=\) 1.58 \(+\) 0.035 \(\mbox{exp}\) \(-\) 0.00058 \(\mbox{exp}^2\)
Bootstrap Mean Exp:
17.17
\(\widehat{y}=\) 1.72 \(+\) 0.024 \(\mbox{exp}\) \(-\) 0.00044 \(\mbox{exp}^2\)
Sample Estimate, \(\widehat{\theta} =\) 0.035 \(- 2\cdot\) 0.00058 \(\cdot\) 18.14
\(=\) 0.0141
Bootstrap Replication 3, \(\widehat{\theta}^*(3) =\) 0.023 \(-2\cdot\) -0.00034 \(\cdot\) 17.89
\(=\) 0.0107
Sample Mean Exp:
18.14
\(\widehat{y}=\) 1.58 \(+\) 0.035 \(\mbox{exp}\) \(-\) 0.00058 \(\mbox{exp}^2\)
Bootstrap Mean Exp:
17.89
\(\widehat{y}=\) 1.64 \(+\) 0.023 \(\mbox{exp}\) \(-\) 0.00034 \(\mbox{exp}^2\)
Sample Estimate, \(\widehat{\theta} =\) 0.035 \(- 2\cdot\) 0.00058 \(\cdot\) 18.14
\(=\) 0.0141
Bootstrap Replication 4, \(\widehat{\theta}^*(4) =\) 0.046 \(-2\cdot\) -0.00078 \(\cdot\) 19.19
\(=\) 0.0159
Sample Mean Exp:
18.14
\(\widehat{y}=\) 1.58 \(+\) 0.035 \(\mbox{exp}\) \(-\) 0.00058 \(\mbox{exp}^2\)
Bootstrap Mean Exp:
19.19
\(\widehat{y}=\) 1.5 \(+\) 0.046 \(\mbox{exp}\) \(-\) 0.00078 \(\mbox{exp}^2\)
We have created 4 bootstrap samples, and corresponding 4 bootstrap replications.
We want to create \(B\) bootstrap samples, and corresponding \(B\) bootstrap replications, for \(B\) large, for example, \(B=10,000\).
How to repeat steps many times?
replicate,boot.replicate to Construct \(B\) Boot. Replications f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
N <- nrow(df) # Number of obs in sample
B <- 10000 # number of bootstrap replications
boot.est <-replicate(B, f.boot1(df, sample(1:N, N, replace=TRUE)))replicate to generate \(B\) bootstrap samples, and corresponding \(B\) bootstrap replications.f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
N <- nrow(df) # Number of obs in sample
B <- 10000 # number of bootstrap replications
boot.est <-replicate(B, f.boot1(df, sample(1:N, N, replace=TRUE)))f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
N <- nrow(df) # Number of obs in sample
B <- 10000 # number of bootstrap replications
boot.est <-replicate(B, f.boot1(df, sample(1:N, N, replace=TRUE)))Inputting user defined function, original data and random sample of indices into replicate function, which is returning \(B\) bootstrap replications.
Use output to compute bootstrap s.e. or CI.
flowchart LR
A{     User-Defined Fn.     <br>     for Estimator     <br>    } --> B{     `replicate`    }
E{     Original     <br>     Sample     <br>    } --> B
B --> C{     bootstrap s.e     <br>}
B --> D{   bootstrap CI     <br>}
Key Idea:
Key Idea:
Bootstrap estimate bias:
\(\bar{\theta}^* = \frac{1}{B} \sum_{b=1}^B \widehat \theta^{}(b)\)
\(\widehat{\mbox{bias}}^* = \bar{\theta}^* - \widehat \theta\)
Use difference between mean of bootstrap replications and estimate on original sample as bootstrap estimator of bias.
Use s.d. of bootstrap replications \(\widehat \theta^*(b)= \widehat \beta_{1}^{*}(b) + 2 \cdot \widehat \beta_{2}^*(b) \cdot \overline{\mbox{exp}}^*(b)\) to form bootstrap standard errors of \(\widehat \theta = \widehat \beta_{1} + 2 \cdot \widehat \beta_{2} \cdot \overline{\mbox{exp}}\).
95% normal-approximation bootstrap CI: \[C^{nb} = [\widehat{\theta}-1.96 \cdot \widehat{\mbox{se}}_B, ~\widehat{\theta}+1.96 \cdot \widehat{\mbox{se}}_B]\] Based on approximate normality.
95% Bootstrap Percentile Interval: \[ C^{pc} = [q^*_{0.025}, ~q^*_{0.975}].\] where \(q^*_{0.025}\) and \(q^*_{0.975}\) are the \(0.025\) and \(0.975\) empirical quantiles of bootstrap replications.
Bootstrap Normal Approx. 95% CI:
Bootstrap Percentile 95% CI:
bootWorkflow using package boot.
flowchart LR
A{       User-Defined Fn.       <br>      for Estimator     } --> B{       `boot`      }
F{       Original Sample      } --> B
B --> C{       bootstrap s.e      }
B --> D{      `boot.ci`      }
D --> E{       bootstrap CI      }
bootFunction boot from package boot:
| parameter | description |
|---|---|
data |
original sample (as vector, matrix, or data frame) |
statistic |
function that constructs bootstrap replication on bootstrap sample, must have two arguments: (1) data, and (2) indices. |
R |
number of bootstrap samples/replications, we have been denoting \(B\) |
stype |
for this course, will always set to "i" for indices. |
bootFunction boot.ci from package boot:
|
parameter |
description |
|---|---|
|
|
output from |
|
|
confidence level, by default is 0.95. |
|
|
type of CI, includes
|
Bootstrap accelerated bias-corrected percentile interval (BCa):
improves upon bootstrap percentile CI by adjusting for bias and skewness in sampling distribution.
method not intuitive, is complicated, justification is more advanced.
easy to implement using boot.ci.
should use it when there is substantial bias/skewness in sampling distribution.
bootlibrary(boot)
f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
boot.out1<- boot(data=df, statistic=f.boot1, R=B, stype="i")
boot.out1
boot.ci1 <- boot.ci(boot.out1, conf=0.95, type=c("norm","perc","bca"))
boot.ci1bootlibrary(boot)
f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
boot.out1<- boot(data=df, statistic=f.boot1, R=B, stype="i")
boot.out1
boot.ci1 <- boot.ci(boot.out1, conf=0.95, type=c("norm","perc","bca"))
boot.ci1bootlibrary(boot)
f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
boot.out1<- boot(data=df, statistic=f.boot1, R=B, stype="i")
boot.out1
boot.ci1 <- boot.ci(boot.out1, conf=0.95, type=c("norm","perc","bca"))
boot.ci1boot taking as inputs:
bootlibrary(boot)
f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
boot.out1<- boot(data=df, statistic=f.boot1, R=B, stype="i")
boot.out1
boot.ci1 <- boot.ci(boot.out1, conf=0.95, type=c("norm","perc","bca"))
boot.ci1
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = df, statistic = f.boot1, R = B, stype = "i")
Bootstrap Statistics :
original bias std. error
t1* 0.01410963 0.00004975603 0.002904684
bootlibrary(boot)
f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
boot.out1<- boot(data=df, statistic=f.boot1, R=B, stype="i")
boot.out1
boot.ci1 <- boot.ci(boot.out1, conf=0.95, type=c("norm","perc","bca"))
boot.ci1boot.ci taking as inputs:
boot,bootlibrary(boot)
f.boot1 <- function(d,i){
mean.exp.b <-mean(d[i,]$experience)
reg.b <- lm(I(log(wage))~ experience+I(experience^2),data=d[i,])
# form bootstrap estimate
a <- c(0,1,2*mean.exp.b)
as.numeric(t(a)%*%coef(reg.b)) }
boot.out1<- boot(data=df, statistic=f.boot1, R=B, stype="i")
boot.out1
boot.ci1 <- boot.ci(boot.out1, conf=0.95, type=c("norm","perc","bca"))
boot.ci1BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 10000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out1, conf = 0.95, type = c("norm", "perc",
"bca"))
Intervals :
Level Normal Percentile BCa
95% ( 0.0084, 0.0198 ) ( 0.0085, 0.0199 ) ( 0.0083, 0.0197 )
Calculations and Intervals on Original Scale
bootboot.out1<- boot(data=df, statistic=f.boot1,
R=B, stype="i")
#boot.out1$t0 is estimate on original sample
boot.out1$t0[1] 0.01410963
#boot.out1$t is vector of 10,000 stored
# bootstrap replications
ggplot(data.frame(boot.out1$t),
aes(x=boot.out1$t)) +
xlab("Bootstrap Replications:
Avgerage Effect Experience")+
geom_histogram(color="darkblue",
fill="lightblue",binwidth=0.0005)| Estimated bias | -0.0000494 |
| Bootstrap s.e. | 0.00287 |
| Bootstrap Normal 95% CI | [0.00837,0.0198] |
| Bootstrap Percentile 95% CI | [0.00849,0.0199] |
| BCa 95% CI | [0.0083,0.0197] |
How to summarize bootstrap results?
What results would you report? how to interpret?
Second Simulation CIs:
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 10000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out2, conf = 0.95, type = c("norm", "perc",
"bca"))
Intervals :
Level Normal Percentile BCa
95% ( 0.0084, 0.0199 ) ( 0.0083, 0.0198 ) ( 0.0083, 0.0198 )
Calculations and Intervals on Original Scale
Third Simulation CIs:
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 10000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out3, conf = 0.95, type = c("norm", "perc",
"bca"))
Intervals :
Level Normal Percentile BCa
95% ( 0.0083, 0.0199 ) ( 0.0085, 0.0199 ) ( 0.0084, 0.0199 )
Calculations and Intervals on Original Scale
| Simulation 1 | Simulation 2 | Simulation 3 | |
|---|---|---|---|
| Estimated bias | -0.0000494 | -0.0000237 | 0.0000082 |
| Bootstrap s.e. | 0.00287 | 0.00293 | 0.00294 |
| Bootstrap Normal 95% CI | [0.00837,0.0198] | [0.00839,0.0199] | [0.00834,0.0199] |
| Bootstrap Percentile 95% CI | [0.00849,0.0199] | [0.00828,0.0198] | [0.00847,0.0199] |
| BCa 95% CI | [0.0083,0.0197] | [0.00831,0.0198] | [0.00845,0.0199] |
Motivation: Mincer Wage Equation
Delta Method vs Bootstrap
Bootstrap Algorithm
Implementing Bootstrap: Average Effect of Experience
Implementing Bootstrap: Experience level that maximizes log wages.
Other Bootstrap Variants
We now implement bootstrap s.e. and CIs for experience level that maximizes log wage.
Key difference from before:
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = df, statistic = f.boot2, R = B, stype = "i")
Bootstrap Statistics :
original bias std. error
t1* 30.23942 4.237817 142.7423
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 10000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out.b, conf = 0.95, type = c("norm",
"perc", "bca"))
Intervals :
Level Normal Percentile BCa
95% (-2013.71, 2042.13 ) ( 25.29, 51.45 ) ( 25.29, 51.23 )
Calculations and Intervals on Original Scale
bootNote extreme skew to the right, extreme outliers.
explanation?
R original bootBias bootSE bootMed
1 10000 30.239 16.03 1034.7 30.333
V1
Min. : 2.23
1st Qu.: 28.09
Median : 30.33
Mean : 46.27
3rd Qu.: 33.57
Max. :101227.05
Simulation 2
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 10000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out.b2, conf = 0.95, type = c("norm",
"perc", "bca"))
Intervals :
Level Normal Percentile BCa
95% (-400.62, 451.27 ) ( 25.14, 51.59 ) ( 25.22, 53.61 )
Calculations and Intervals on Original Scale
Simulation 3
BOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS
Based on 10000 bootstrap replicates
CALL :
boot.ci(boot.out = boot.out.b3, conf = 0.95, type = c("norm",
"perc", "bca"))
Intervals :
Level Normal Percentile BCa
95% (-449.04, 498.47 ) ( 25.14, 52.12 ) ( 25.22, 53.14 )
Calculations and Intervals on Original Scale
| Simulation 1 | Simulation 2 | Simulation 3 | |
|---|---|---|---|
| Estimated bias | 16.03 | 4.915 | 5.523 |
| Bootstrap s.e. | 1034.7 | 217.32 | 241.72 |
| Bootstrap Normal 95% CI | [-2014,2042] | [-400.6,451.3] | [-449,498.5] |
| Bootstrap Percentile 95% CI | [25.29,51.45] | [25.14,51.59] | [25.14,52.12] |
| BCa 95% CI | [25.29,51.23] | [25.22,53.61] | [25.22,53.14] |
what’s going on?
what would you report? how summarize?
We have investigated bootstrap inference for two parameters:
How to summarize results for each parameter? What results would to rely on?
How are bootstrap results different for the two parameters? what do you think are the causes of the differences? what are the take-away lessons?
Motivation: Mincer Wage Equation
Delta Method vs Bootstrap
Bootstrap Algorithm
Implementing Bootstrap: Average Effect of Experience
Implementing Bootstrap: Experience level that maximizes log wages.
Other Bootstrap Variants
We have done nonparametric bootstrap for OLS, also called “pairs bootstrap” in regression context.
Other bootstrap procedures for regressions:
Residual bootstrap,
Wild bootstrap.
Tradeoffs?
We have done bootstrap for i.i.d. data.
Can modify bootstrap procedure for
.
Econ 123